package com.example.everying.model.entity.user;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.time.LocalDateTime;

/**
 * 积分账户实体类
 */
@Data
@TableName("points_account")
public class PointsAccount {

    /**
     * 主键ID
     */
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "主键ID")
    private Long id;

    /**
     * 用户ID
     */
    @ApiModelProperty(value = "用户ID")
    private String userId;

    /**
     * 总积分
     */
    @ApiModelProperty(value = "总积分")
    private Integer totalPoints;

    /**
     * 可用积分
     */
    @ApiModelProperty(value = "可用积分")
    private Integer availablePoints;

    /**
     * 冻结积分
     */
    @ApiModelProperty(value = "冻结积分")
    private Integer frozenPoints;

    @Version
    @ApiModelProperty(value = "版本号")
    private Integer version;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value = "更新时间")
    private LocalDateTime updateTime;
}